using UnityEngine;
using UnityEngine.UI;
using QFramework;
using UnityEngine.SceneManagement;

namespace ProjectSurvivor
{
	public class TestUIGameStartPanelData : UIPanelData
	{
	}
	public partial class TestUIGameStartPanel : UIPanel
	{
		protected override void OnInit(IUIData uiData = null)
		{
			mData = uiData as TestUIGameStartPanelData ?? new TestUIGameStartPanelData();
			// please add init code here
			BtnStaetGame.onClick.AddListener(() =>
			{
				AudioKit.PlaySound("levelup");
				Global.ResetData();//重置战斗相关的临时数据
				this.CloseSelf();
				SceneManager.LoadScene("Game");
			});
			BtnCoinUpgrade.onClick.AddListener(()=>
			{
				AudioKit.PlaySound("levelup");
				CoinUpgradePanel.Show();
			});
			
		}
		
		protected override void OnOpen(IUIData uiData = null)
		{
		}
		
		protected override void OnShow()
		{
		}
		
		protected override void OnHide()
		{
		}
		
		protected override void OnClose()
		{
		}
	}
}
